<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/jsp/includes.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Gerenciamento dos clientes</title>
</head>
<body>
	<form:form action="cliente.do" method="post" commandName="cliente">

		<table>
			<tr>
				<td>ID do cliente</td>
				<td><form:input path="cliente_id" /></td>
				<td>Nome do cliente</td>
				<td><form:input path="nome_cliente" /></td>
				<td>Rua</td>
				<td><form:input path="endereco.rua" /></td>
				<td>Complemento</td>
				<td><form:input path="endereco.complemento" /></td>
			</tr>



			<tr>
				<td colspan="2"><input type="submit" name="action" value="Add" />
					<input type="submit" name="action" value="Edit" /> <input
					type="submit" name="action" value="Delete" /> <input type="submit"
					name="action" value="Search" /></td>
			</tr>
		</table>
	</form:form>
	<table border="1">
		<th>ID</th>
		<th>Nome</th>
		<th>Rua</th>
		<th>Complemento</th>
		<c:forEach items="${clienteList}" var="cliente">
			<tr>
				<td>${cliente.cliente_id}</td>
				<td>${cliente.nome_cliente}</td>
				<td>${cliente.endereco.rua}</td>
				<td>${cliente.endereco.complemento}</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>